Automatic frame selection for 3d model construction

ABSTRACT

A method includes obtaining, by a processor, a set of ultrasound frames showing a portion of a heart of a subject, identifying a subset of the frames, responsively to the subset having been acquired at one or more predefined phases of at least one physiological cycle of the subject, computing respective image-quality scores for at least the subset of the frames, each of the scores quantifying an image quality with which one or more anatomical portions of interest are shown in a respective one of the frames, and, based on the image-quality scores, selecting, for subsequent use, at least one frame from the subset of the frames. Other embodiments are also described.

FIELD OF THE INVENTION

The present invention is related to the field of medical imaging.

BACKGROUND

U.S. Pat. No. 8,891,881 describes a method for identifying an optimalimage frame. The method includes receiving a selection of an anatomicalregion of interest in an object of interest. Furthermore, the methodincludes obtaining a plurality of image frames corresponding to theselected anatomical region of interest. The method also includesdetermining a real-time indicator corresponding to the plurality ofacquired image frames, wherein the real-time indicator is representativeof quality of an image frame. In addition, the method includescommunicating the real-time indicator to aid in selecting an optimalimage frame.

U.S. Pat. No. 10,143,398 describes a system and method for imaging atarget in a patient's body using a pre-acquired image of the target anda catheter having a position sensor and an ultrasonic imaging sensor.The catheter is placed in the patient's body and positional informationof a portion of the catheter in the patient's body is determined usingthe position sensor. The catheter is used to generate an ultrasonicimage of the target using the ultrasonic imaging sensor. An imageprocessor is used for determining positional information for any pixelof the ultrasonic image of the target and registering the pre-acquiredimage with the ultrasonic image, and a display is used for displayingthe registered pre-acquired image and ultrasonic image.

US Patent Application Publication 2017/0360411 describes techniques forguiding an operator to use an ultrasound device. For example, some ofthe techniques may be used to identify a particular anatomical view of asubject to image with an ultrasound device, guide an operator of theultrasound device to capture an ultrasound image of the subject thatcontains the particular anatomical view, and/or analyze the capturedultrasound image to identify medical information about the subject.

US Patent Application Publication 2011/0152684 describes a method forthree-dimensional (3D) mapping, including acquiring a plurality oftwo-dimensional (2D) ultrasonic images of a cavity in a body of a livingsubject, the 2D images having different respective positions in a 3Dreference frame. In each of the 2D ultrasonic images, pixelscorresponding to locations within an interior of the cavity areidentified. The identified pixels from the plurality of the 2D imagesare registered in the 3D reference frame so as to define a volumecorresponding to the interior of the cavity. An outer surface of thevolume is reconstructed, representing an interior surface of the cavity.

Zayed et al., “Automatic frame selection using CNN in ultrasoundelastography,” arXiv preprint arXiv:2002.06734 (2020), introduces amethod using a convolutional neural network (CNN) to determine thesuitability of a pair of radiofrequency (RF) frames for elastography, orto automatically choose the best pair of RF frames yielding ahigh-quality strain image.

SUMMARY OF THE INVENTION

There is provided, in accordance with some embodiments of the presentinvention, a system including circuitry, configured to receive andprocess at least one signal tracking at least one physiological cycle ofa subject, and a processor. The processor is configured to receive thesignal from the circuitry following the processing of the signal. Theprocessor is further configured to obtain a set of ultrasound framesshowing a portion of a heart of the subject. The processor is furtherconfigured to identify a subset of the frames responsively to the subsethaving been acquired at one or more predefined phases of thephysiological cycle, based on the signal. The processor is furtherconfigured to compute respective image-quality scores for at least thesubset of the frames, each of the scores quantifying an image qualitywith which one or more anatomical portions of interest are shown in arespective one of the frames. The processor is further configured toselect, for subsequent use, at least one frame from the subset of theframes, based on the image-quality scores.

In some embodiments, the physiological cycle includes a respiratorycycle.

In some embodiments, the physiological cycle includes a cardiac cycle.

In some embodiments, the processor is configured to select the frame foruse in building a three-dimensional anatomical model.

In some embodiments, the anatomical portions of interest include ananatomical portion selected from the group of anatomical portionsconsisting of: a left atrium body, a pulmonary vein (PV), a left atrialappendage, a left ventricle (LV) endocardium, an LV epicardium, aposteromedial papillary muscle, an anterolateral papillary muscle, aleft coronary cusp, a right coronary cusp, a non-coronary cusp, and acoronary sinus.

In some embodiments, the processor is configured to compute theimage-quality scores using a neural network.

In some embodiments, the set includes between 60 and 120 frames.

In some embodiments, the processor is further configured to:

ascertain that a number of the image-quality scores passing a predefinedimage-quality-score threshold is less than a predefined frame-numberthreshold, and

in response to the ascertaining, output a warning.

There is further provided, in accordance with some embodiments of thepresent invention, a method including obtaining, by a processor, a setof ultrasound frames showing a portion of a heart of a subject. Themethod further includes identifying a subset of the frames, responsivelyto the subset having been acquired at one or more predefined phases ofat least one physiological cycle of the subject. The method furtherincludes computing respective image-quality scores for at least thesubset of the frames, each of the scores quantifying an image qualitywith which one or more anatomical portions of interest are shown in arespective one of the frames. The method further includes, based on theimage-quality scores, selecting, for subsequent use, at least one framefrom the subset of the frames.

There is further provided, in accordance with some embodiments of thepresent invention, a computer software product including a tangiblenon-transitory computer-readable medium in which program instructionsare stored. The instructions, when read by a processor, cause theprocessor to obtain a set of ultrasound frames showing a portion of aheart of a subject. The instructions further cause the processor toidentify a subset of the frames, responsively to the subset having beenacquired at one or more predefined phases of at least one physiologicalcycle of the subject. The instructions further cause the processor tocompute respective image-quality scores for at least the subset of theframes, each of the scores quantifying an image quality with which oneor more anatomical portions of interest are shown in a respective one ofthe frames. The instructions further cause the processor to select, forsubsequent use, at least one frame from the subset of the frames, basedon the image-quality scores.

The present invention will be more fully understood from the followingdetailed description of embodiments thereof, taken together with thedrawings, in which:

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a schematic illustration of an ultrasound imaging andframe-selection system, in accordance with some embodiments of thepresent invention;

FIG. 2 is an example module diagram for a mapping processor, inaccordance with some embodiments of the present invention;

FIG. 3 is a flow diagram for an algorithm for selecting ultrasoundframes showing one or more anatomical portions of interest, inaccordance with some embodiments of the present invention; and

FIG. 4 is a schematic illustration of an ultrasound frame scored inaccordance with some embodiments of the present invention.

DETAILED DESCRIPTION OF EMBODIMENTS Overview

In some applications, information derived from ultrasound frames isincorporated into an anatomical model. However, ultrasound frames mayvary greatly from each other with respect to the image quality withwhich important anatomical features are shown, and it is tedious tomanually select those frames having sufficient image quality.

To address this challenge, embodiments of the present invention providea processor configured to automatically score ultrasound frames forimage quality, typically using a trained neural network. Those frameshaving higher scores are then selected for subsequent use in buildingthe anatomical model, while those frames with lower scores arediscarded. Typically, the processor further filters the frames per thecardiac cycle and/or respiratory cycle of the subject from whom theframes were acquired, such that only frames acquired during a particularcardiac phase and/or respiratory phase are selected.

System Description

Reference is initially made to FIG. 1, which is a schematic illustrationof an ultrasound imaging and frame-selection system 20, in accordancewith some embodiments of the present invention.

System 20 comprises an intrabody imaging probe 28. As shown in FIG. 1, aphysician 22 may navigate probe 28 through the vascular system of asubject 26 until the distal end of the probe is positioned within theheart 24 of subject 26. Subsequently, physician 22 may use the probe toimage intracardiac tissue of the subject.

More specifically, the distal end of probe 28 comprises an ultrasoundimaging device 50 comprising one or more transducers 52. Transducers 52are configured to emit ultrasonic waves at the subject's intracardiactissue, receive reflections of these waves, and output signals inresponse to the reflections. The signals are carried by wires 56 runningthrough probe 28 to an ultrasound processor 31, which may be disposed,for example, within a first console 35. Based on the signals, usingstandard techniques known in the art, ultrasound processor 31 constructsultrasound frames showing the interior of heart 24. In this manner,system 20 may acquire, for example, 20-40 frames/s.

In some embodiments, each ultrasound frame is two-dimensional. (A 2Dframe may alternatively be referred to as an “image.”) In otherembodiments, each ultrasound frame is three-dimensional. (A 3D frame mayalternatively be referred to as a “volume.”)

System 20 further comprises a mapping subsystem 27, which is typicallydisposed within a second console 34. Mapping subsystem 27 comprisesmapping circuitry 29, a mapping processor 38, and a memory 32 comprisinga volatile memory, such as a random access memory (RAM), and/or anon-volatile memory. Memory 32 is configured to store a frame-scoringmodel 44, which typically comprises a neural network.

Mapping processor 38 is configured to receive a stream of acquiredultrasound frames from ultrasound processor 31 over any suitable wiredor wireless interface. As the stream is received, the mapping processorseparates the frames into sets of consecutive frames, referred to hereinas “clips.” Each clip may include any suitable number of frames, such asbetween 60 and 120 frames.

The distal end of probe 28 further comprises a tracking sensor 54, whichoutputs tracking signals indicating the location and orientation of thesensor within the body. The tracking signals are carried by wires 56 tomapping circuitry 29, which comprises an analog-to-digital (A/D)converter and, optionally, a noise filter and/or other signal-processingcircuits. After digitizing and, optionally, otherwise processing thetracking signals, mapping circuitry 29 passes the tracking signals tomapping processor 38. Based on the tracking signals, the mappingprocessor ascertains the location and orientation of the 2D or 3Danatomical slice represented in each frame.

In some embodiments, tracking sensor 54 comprises an electromagneticsensor. A driver circuit 36 in console 34 drives field generators 30 togenerate a magnetic field, which induces the aforementioned trackingsignals in tracking sensor 54.

In other embodiments, the tracking sensor comprises an impedance-basedor ultrasonic sensor.

Typically, system 20 further comprises multiple electrocardiographic(ECG) electrodes 33, which are coupled to the subject's body. (For easeof illustration, only one electrode 33 is shown.) Signals fromelectrodes 33, which track the cardiac cycle of the subject, arereceived by mapping circuitry 29. After digitizing and, optionally,otherwise processing the ECG signals, the mapping circuitry passes theECG signals to mapping processor 38. Based on the ECG signals, themapping processor ascertains the phase of the subject's cardiac cycleduring which each frame is acquired.

Typically, the mapping processor further ascertains the phase of thesubject's respiratory cycle during which each frame is acquired.

For example, in some embodiments, system 20 further comprises multipleelectrode patches 37, which are coupled to the subject's body. (For easeof illustration, only one electrode patch 37 is shown.) Electriccurrents are passed between the electrode patches, and the resultingsignals at the electrode patches are received by mapping circuitry 29.(As the subject breathes, the impedance of the subject's body changes,such that the signals at electrode patches 37 vary over the respiratorycycle. Hence, the signals from patches 37 track the respiratory cycle ofthe subject.) After digitizing and, optionally, otherwise processingthese signals, the mapping circuitry passes these signals to mappingprocessor 38. Based on these signals (and, optionally, on the positionof the probe), the mapping processor ascertains the respiratory phase atwhich each frame was acquired.

Alternatively or additionally, the mapping processor may ascertain therespiratory phase based on a signal received from a location sensor onthe subject's chest.

Typically, system 20 further comprises a display 40 configured todisplay any acquired ultrasound frames, along with any outputs from themapping processor, such as the warnings described below with referenceto FIGS. 2-3. In some embodiments, display 40 further shows the locationand orientation of the distal end of the probe, e.g., by superimposingan icon representing the distal end of the probe over an image (or asimulated image) of the heart.

Typically, system 20 further comprises one or more input devices 42,using which physician 22 may provide system 20 with any suitable inputs.The inputs may be transferred between the first and second consoles overany suitable wired or wireless interface.

In other embodiments, probe 28 comprises an external ultrasound imagingdevice, which may be placed against the chest of subject 26 so as toacquire ultrasonic frames as described above.

In general, mapping processor 38 may be embodied as a single processor,or as a cooperatively networked or clustered set of processors. Thefunctionality of mapping processor 38 may be implemented solely inhardware, e.g., using one or more fixed-function or general-purposeintegrated circuits, Application-Specific Integrated Circuits (ASICs),and/or Field-Programmable Gate Arrays (FPGAs). Alternatively, thisfunctionality may be implemented at least partly in software. Forexample, mapping processor 38 may be embodied as a programmed processorcomprising, for example, a central processing unit (CPU) and/or aGraphics Processing Unit (GPU). Program code, including softwareprograms, and/or data may be loaded for execution and processing by theCPU and/or GPU. The program code and/or data may be downloaded to themapping processor in electronic form, over a network, for example.Alternatively or additionally, the program code and/or data may beprovided and/or stored on non-transitory tangible media, such asmagnetic, optical, or electronic memory. Such program code and/or data,when provided to the mapping processor, produce a machine orspecial-purpose computer, configured to perform the tasks describedherein.

In some embodiments, the functionality of the mapping processor is splitover several modules, each of which may be implemented in hardware,software, or a combination of hardware and software elements. In thisregard, reference is additionally made to FIG. 2, which is an examplemodule diagram for mapping processor 38, in accordance with someembodiments of the present invention.

In some embodiments, the mapping processor executes an ultrasound-frame(US-frame) receiver 76, configured to receive a stream of ultrasoundframes from ultrasound processor 31 and to separate the frames intoclips, as described above.

The mapping processor further executes an ECG-signal receiver 78,configured to receive the processed ECG signals from circuitry 29. Themapping processor further executes a patch-signal receiver 80,configured to receive the processed patch signals, which track therespiratory cycle of the subject, from circuitry 29. The mappingprocessor further executes a tracking-signal receiver 82, configured toreceive the processed tracking signals, which track the location andorientation of sensor 54, from circuitry 29.

Each of the four aforementioned modules passes its received data to aframe/metadata associator 84. By correlating between the signals and therespective times at which the frames were acquired, frame/metadataassociator 84 ascertains metadata for each frame, and associates themetadata with the frame. The metadata typically include the cardiacphase and respiratory phase at which the frame was acquired, along withthe location and orientation of the slice represented in the frame.

Each clip of ultrasound frames, together with its associated metadata,is passed to a frame filterer 86, which filters the clip based on therespective cardiac and/or respiratory phases at which the frames in theclip were acquired. Those frames that pass through the filter(s) arepassed to a frame scorer 88, which scores the frames for image quality.Based on the scores, a frame selector 90 may select some of the framesfor subsequent use. The selected frames may then be stored in memory 32by a frame storer 92. Alternatively or additionally, if an insufficientnumber of frames were selected, a warning outputter 94 may output awarning. Further details regarding the functionality of frame filterer86, frame scorer 88, frame selector 90, and warning outputter 94 areprovided below with reference to FIG. 3.

It is emphasized that the module diagram in FIG. 2 is provided by way ofexample only, and that the functionality of the mapping processor may besplit over any suitable set of modules.

Filtering, Scoring, and Selecting Frames

Reference is now made to FIG. 3, which is a flow diagram for analgorithm 58 for selecting ultrasound frames showing one or moreanatomical portions of interest, in accordance with some embodiments ofthe present invention. Algorithm 58, or any suitable substitutealgorithm performing functions similar to those of algorithm 58, isexecuted by mapping processor 38 (FIG. 1).

Algorithm 58 begins at a clip-obtaining step 60, at which the mappingprocessor obtains a clip of ultrasound frames acquired from subject 26(FIG. 1), along with associated metadata. For example, as describedabove with reference to FIG. 2, frame filterer 86 may receive the clipand metadata from frame/metadata associator 84. Alternatively, themapping processor may read the clip and metadata from a local or remotestorage device, such as a hard drive or flash drive.

As described above with reference to FIG. 2, the metadata typicallyinclude the respective cardiac and respiratory phases at which theframes belonging to the clip were acquired. Alternatively, the metadatamay include only the cardiac phases, or only the respiratory phases. Inany case, based on the portion of the metadata relating to thephysiological cycle(s) of the subject, the mapping processor identifiesa subset of the frames responsively to the subset having been acquiredat one or more predefined phases of the physiological cycle(s).

For example, per algorithm 58, subsequently to obtaining the clip andmetadata, the mapping processor performs a first filtering step 62, atwhich the mapping processor filters the clip by cardiac phase, followedby a second filtering step 64, at which the mapping processor filtersthe clip by respiratory phase. Alternatively, second filtering step 64may be performed prior to first filtering step 62. As described abovewith reference to FIG. 2, these filtering steps may be performed byframe filterer 86.

More specifically, at first filtering step 62, the mapping processorretains those frames acquired at one or more predefined phases of thecardiac cycle, while discarding those frames acquired at differentphases. A predefined phase may correspond to any suitable portion of thesubject's ECG signal, such as an interval spanning the end of theT-wave. Typically, first filtering step 62 retains 1-5 frames from eachcardiac cycle, the number of frames varying as a function of the lengthof the predefined phase and the rate at which the frames were acquired.Thus, for example, assuming the clip includes 90 frames acquired overapproximately three seconds and spanning 3-4 cardiac cycles, firstfiltering step 62 may retain 5-20 frames while filtering out theremaining frames.

Similarly, at second filtering step 64, the mapping processor retainsthose frames acquired at one or more predefined phases of therespiratory cycle, such as the end-expiration phase, while discardingthose frames acquired at different phases. Typically, second filteringstep 64 retains around 50% of the frames from each respiratory cycle.Thus, for example, assuming the first filtering step retains 5-20 framesand the second filtering step is performed subsequently to the firstfiltering step, the second filtering step may retain 2-10 frames whilediscarding the remainder.

Subsequently to filtering the clip, the mapping processor, at a scoringstep 66, applies frame-scoring model 44 (FIG. 1) to the remaining framesso as to compute respective image-quality scores for these frames. Eachof the scores quantifies the image quality with which one or moreanatomical portions of interest are shown in a respective one of theframes. Typically, as assumed below, a higher score indicates higherimage quality, though the opposite convention may alternatively be used.As described above with reference to FIG. 2, scoring step 66 may beperformed by frame scorer 88.

For example, the mapping processor may compute a respective score foreach anatomical portion of interest shown in the frame, such thatmultiple scores may be computed for a single frame. Alternatively, themapping processor may compute a single score for each frame.

Subsequently, based on the image-quality scores, the mapping processor,at a frame-selecting step 68, selects any high-scoring frames forsubsequent use. As described above with reference to FIG. 2,frame-selecting step 68 may be performed by frame selector 90.

For example, for embodiments in which a single score is computed perframe, the mapping processor may select each frame whose score exceeds apredefined image-quality-score threshold. Optionally, the number ofselected frames may be capped, i.e., the mapping processor may select nomore than N frames (even if more than N scores exceed theimage-quality-score threshold), N being any predetermined positiveinteger. For embodiments in which the scores are computed per anatomicalportion, the mapping processor may select each frame having at least onescore exceeding a predefined image-quality-score threshold. (Optionally,the anatomical portions may have different respectiveimage-quality-score thresholds.)

In some embodiments, the anatomical portions of interest include one ormore of the following: a left atrium body, a pulmonary vein (PV), a leftatrial appendage, a left ventricle (LV) endocardium, an LV epicardium, aposteromedial papillary muscle, an anterolateral papillary muscle, aleft coronary cusp, a right coronary cusp, a non-coronary cusp, and acoronary sinus.

Following frame-selecting step 68, the mapping processor checks, at achecking step 70, whether enough frames were selected. In particular,for embodiments in which a single score is computed per frame, themapping processor compares the number of selected frames to theframe-number threshold. For embodiments in which the scores are computedper anatomical portion, the mapping processor, for each of theanatomical portions, counts the number of selected frames in which thescore for the anatomical portion exceeds the image-quality-scorethreshold, and then compares this count with the frame-number threshold.(Optionally, the anatomical portions may have different respectiveframe-number thresholds.) Checking step 70 may be performed by frameselector 90 or by warning outputter 94 (FIG. 2).

If enough frames were selected, algorithm 58 ends. Otherwise, themapping processor outputs a warning (typically by displaying thewarning) at a warning step 72. In response to the warning, the physicianmay acquire another clip. As described above with reference to FIG. 2,warning step 72 may be performed by warning outputter 94.

In alternate embodiments, scoring step 66 is performed prior to firstfiltering step 62 and/or second filtering step 64. For example, theentire clip may be scored prior to any filtering of the clip.

In some embodiments, each selected frame is used for building athree-dimensional anatomical model. For example, features of theanatomical portions of interest shown in the frame may be incorporatedinto the model, or the anatomical portions may be tagged in the model.(In such embodiments, 1-3 frames showing each anatomical portion ofinterest with sufficient image quality may be required, i.e., theaforementioned frame-number threshold may be between 1 and 3.)Alternatively or additionally, a selected frame may be used to trackanatomical changes over time.

The Frame-Scoring Model

In some embodiments, the frame-scoring model includes a machine-learnedmodel.

For example, in some embodiments, the frame-scoring model includes aneural network, such as a convolutional neural network (CNN). Such aneural network may be derived from any suitable conventional neuralnetwork used in computer-vision applications. An example of such aconventional neural network is an edition of the Inception ConvolutionalNeural Network (e.g., Inception-v3 or Inception-ResNet-v2), which isdescribed in Szegedy, Christian, et al., “Going deeper withconvolutions,” Proceedings of the IEEE conference on computer vision andpattern recognition, 2015, whose disclosure is incorporated herein byreference. Another example is an edition of the Residual Neural Network(e.g., ResNet50), which is described in He, Kaiming, et al., “Deepresidual learning for image recognition,” Proceedings of the IEEEconference on computer vision and pattern recognition, 2016, whosedisclosure is incorporated herein by reference. Yet another example isan edition of the Visual Geometry Group neural network (e.g., VGG-19),which is described in Simonyan, Karen, and Andrew Zisserman, “Very deepconvolutional networks for large-scale image recognition,” arXivpreprint arXiv:1409.1556 (2014), whose disclosure is incorporated hereinby reference.

For example, the last few (e.g., the last two) layers of a conventionalneural network may be replaced with two dense layers including a singleoutput neuron configured to output an image-quality score. A similarmodification to Inception-v3 and Inception-ResNet-v2 is described, forexample, in Kaur, Taranjit, and Tapan Kumar Gandhi, “Deep convolutionalneural networks with transfer learning for automated brain imageclassification,” Machine Vision and Applications 31.3 (2020): 1-16,whose disclosure is incorporated herein by reference. Another similarmodification to Inception-v3 and ResNet50 is described, for example, inVesal, Sulaiman, et al., “Classification of breast cancer histologyimages using transfer learning,” International conference image analysisand recognition, Springer, Cham, 2018, whose disclosure is incorporatedherein by reference.

The neural network is trained on a learning set including a large numberof ultrasound frames. In some embodiments, each frame in the learningset (or each anatomical portion of interest shown in the frame) istagged as “high image-quality” or “low image-quality,” and theimage-quality score is the probability that the scored frame (oranatomical portion) belongs to the “high image-quality” class.

In some such embodiments, the frame-scoring model further includes anauxiliary neural network, which is trained to ascertain which anatomicalportions of interest are shown in any given frame.

The output from the auxiliary neural network is passed as input to theframe-scoring neural network. Alternatively, the anatomical portions ofinterest may be identified implicitly by the frame-scoring neuralnetwork during the scoring process.

Typically, for each frame, the slice location and orientation, which areincluded in the aforementioned metadata, are input to the frame-scoringneural network or to the auxiliary neural network.

In other embodiments, the mapping processor computes the image-qualityscores without inputting the frames to a machine-learned model. Forexample, given that the quality of a frame is a function of thesharpness of the blood-tissue boundaries shown in the frame, the mappingprocessor may score each frame based on the magnitudes of the gradientsbetween the pixels or voxels in the frame. Alternatively oradditionally, the mapping processor may score each frame based on thedegree to which the frame matches one or more predefined patternsrepresenting the relevant anatomical portions of interest.

Reference is now made to FIG. 4, which is a schematic illustration of anultrasound frame 74 scored in accordance with some embodiments of thepresent invention.

Frame 74 shows a right atrium (RA), a coronary sinus (CS), anon-coronary cusp (NCC), a left coronary cusp (LCC), and a leftventricle (LV). In this example, the score is on a scale of 0-1, with 1corresponding to the highest image quality. The RA and CS, whoseblood-tissue boundaries are relatively sharp, have relatively highscores, while the other anatomical portions have lower scores.

It will be appreciated by persons skilled in the art that the presentinvention is not limited to what has been particularly shown anddescribed hereinabove. Rather, the scope of embodiments of the presentinvention includes both combinations and subcombinations of the variousfeatures described hereinabove, as well as variations and modificationsthereof that are not in the prior art, which would occur to personsskilled in the art upon reading the foregoing description. Documentsincorporated by reference in the present patent application are to beconsidered an integral part of the application except that to the extentany terms are defined in these incorporated documents in a manner thatconflicts with the definitions made explicitly or implicitly in thepresent specification, only the definitions in the present specificationshould be considered.

1. A system, comprising: circuitry, configured to receive and process atleast one signal tracking at least one physiological cycle of a subject;and a processor, configured to: receive the signal from the circuitryfollowing the processing of the signal, obtain a set of ultrasoundframes showing a portion of a heart of the subject, based on the signal,identify a subset of the frames responsively to the subset having beenacquired at one or more predefined phases of the physiological cycle,compute respective image-quality scores for at least the subset of theframes, each of the scores quantifying an image quality with which oneor more anatomical portions of interest are shown in a respective one ofthe frames, and based on the image-quality scores, select, forsubsequent use, at least one frame from the subset of the frames.
 2. Thesystem according to claim 1, wherein the physiological cycle includes arespiratory cycle.
 3. The system according to claim 1, wherein thephysiological cycle includes a cardiac cycle.
 4. The system according toclaim 1, wherein the processor is configured to select the frame for usein building a three-dimensional anatomical model.
 5. The systemaccording to claim 1, wherein the anatomical portions of interestinclude an anatomical portion selected from the group of anatomicalportions consisting of: a left atrium body, a pulmonary vein (PV), aleft atrial appendage, a left ventricle (LV) endocardium, an LVepicardium, a posteromedial papillary muscle, an anterolateral papillarymuscle, a left coronary cusp, a right coronary cusp, a non-coronarycusp, and a coronary sinus.
 6. The system according to claim 1, whereinthe processor is configured to compute the image-quality scores using aneural network.
 7. The system according to claim 1, wherein the setincludes between 60 and 120 frames.
 8. The system according to claim 1,wherein the processor is further configured to: ascertain that a numberof the image-quality scores passing a predefined image-quality-scorethreshold is less than a predefined frame-number threshold, and inresponse to the ascertaining, output a warning.
 9. A method, comprising:obtaining, by a processor, a set of ultrasound frames showing a portionof a heart of a subject; identifying a subset of the frames,responsively to the subset having been acquired at one or morepredefined phases of at least one physiological cycle of the subject;computing respective image-quality scores for at least the subset of theframes, each of the scores quantifying an image quality with which oneor more anatomical portions of interest are shown in a respective one ofthe frames; and based on the image-quality scores, selecting, forsubsequent use, at least one frame from the subset of the frames. 10.The method according to claim 9, wherein the physiological cycleincludes a respiratory cycle.
 11. The method according to claim 9,wherein the physiological cycle includes a cardiac cycle.
 12. The methodaccording to claim 9, wherein selecting the frame comprises selectingthe frame for use in building a three-dimensional anatomical model. 13.The method according to claim 9, wherein the anatomical portions ofinterest include an anatomical portion selected from the group ofanatomical portions consisting of: a left atrium body, a pulmonary vein(PV), a left atrial appendage, a left ventricle (LV) endocardium, an LVepicardium, a posteromedial papillary muscle, an anterolateral papillarymuscle, a left coronary cusp, a right coronary cusp, a non-coronarycusp, and a coronary sinus.
 14. The method according to claim 9, whereincomputing the image-quality scores comprises computing the image-qualityscores using a neural network.
 15. The method according to claim 9,wherein the set includes between 60 and 120 frames.
 16. The methodaccording to claim 9, further comprising: ascertaining that a number ofthe image-quality scores passing a predefined image-quality-scorethreshold is less than a predefined frame-number threshold; and inresponse to the ascertaining, outputting a warning.
 17. A computersoftware product comprising a tangible non-transitory computer-readablemedium in which program instructions are stored, which instructions,when read by a processor, cause the processor to: obtain a set ofultrasound frames showing a portion of a heart of a subject, identify asubset of the frames, responsively to the subset having been acquired atone or more predefined phases of at least one physiological cycle of thesubject, compute respective image-quality scores for at least the subsetof the frames, each of the scores quantifying an image quality withwhich one or more anatomical portions of interest are shown in arespective one of the frames, and based on the image-quality scores,select, for subsequent use, at least one frame from the subset of theframes.
 18. The computer software product according to claim 17, whereinthe physiological cycle includes a respiratory cycle.
 19. The computersoftware product according to claim 17, wherein the physiological cycleincludes a cardiac cycle.
 20. The computer software product according toclaim 17, wherein the instructions cause the processor to compute theimage-quality scores using a neural network.